<template>
  <div class="back-home">
    <i :style="background" @click="onBackHomeClick"></i>
  </div>
</template>

<script>
export default {
  name: 'back-home',
  props: {
  },
  data () {
    return {
      icons: [
        `${require('static/images/home.png')}`
      ]
    }
  },
  computed: {
    background () {
      return `background-image: url(${this.icons[0]});`
    }
  },
  methods: {
    onBackHomeClick () {
      wx.reLaunch({
        url: '/pages/index/main'
      })
    },
  },
}
</script>

<style lang="less" scoped>
.back-home {
  i {
    position: fixed;
    bottom: 156rpx;
    right: 30rpx;
    width: 80rpx;
    height: 80rpx;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
  }
}
</style>